//
//  XDMainViewLauncherViewController.m
//  iphone.mobileoa
//
//  Created by 李亚春 on 13-7-5.
//  Copyright (c) 2013年 Epoint. All rights reserved.
//

#import "XDMainViewLauncherViewController.h"
#import "XDTodoListViewController.h"

@interface XDMainViewLauncherViewController ()

@end

@implementation XDMainViewLauncherViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    [[self appControllers] setObject:[XDTodoListViewController class] forKey:@"ItemViewController"];
    if(![self hasSavedLauncherItems])
	{
		[self.launcherView setPages:[NSMutableArray arrayWithObjects:
                                     [NSMutableArray arrayWithObjects:
                                      [[MyLauncherItem alloc] initWithTitle:@"待办事宜"
                                                                iPhoneImage:@"dbsy"
                                                                  iPadImage:@"dbsy"
                                                                     target:@"XDTodoListViewController"
                                                                targetTitle:@"Item 1 View"
                                                                  deletable:NO],
                                      [[MyLauncherItem alloc] initWithTitle:@"公务邮件"
                                                                iPhoneImage:@"gwyj"
                                                                  iPadImage:@"gwyj"
                                                                     target:@"XDMailMainViewController"
                                                                targetTitle:@"Item 2 View"
                                                                  deletable:NO],
                                      [[MyLauncherItem alloc] initWithTitle:@"通知公告"
                                                                iPhoneImage:@"tzgg"
                                                                  iPadImage:@"tzgg"
                                                                     target:@"XDWebInfoListViewController"
                                                                targetTitle:@"Item 3 View"
                                                                  deletable:YES],
                                      [[MyLauncherItem alloc] initWithTitle:@"信息简报"
                                                                iPhoneImage:@"xxjb"
                                                                  iPadImage:@"xxjb"
                                                                     target:@"XDWebInfoCategoryListViewController"
                                                                targetTitle:@"Item 4 View"
                                                                  deletable:NO],
                                      [[MyLauncherItem alloc] initWithTitle:@"通讯录"
                                                                iPhoneImage:@"txl"
                                                                  iPadImage:@"txl"
                                                                     target:@"XDContactsListViewController"
                                                                targetTitle:@"Item 5 View"
                                                                  deletable:YES],
                                      [[MyLauncherItem alloc] initWithTitle:@"我的日程"
                                                                iPhoneImage:@"wdrc"
                                                                  iPadImage:@"wdrc"
                                                                     target:@"XDScheduleMainViewController"
                                                                targetTitle:@"Item 6 View"
                                                                  deletable:NO],
                                      [[MyLauncherItem alloc] initWithTitle:@"附件管理"
                                                                iPhoneImage:@"fjgl"
                                                                  iPadImage:@"fjgl"
                                                                     target:@"XDAttachManagerViewController"
                                                                targetTitle:@"Item 7 View"
                                                                  deletable:NO],
                                      [[MyLauncherItem alloc] initWithTitle:@"数据同步"
                                                                iPhoneImage:@"sjtb2"
                                                                  iPadImage:@"sjtb2"
                                                                     target:@"XDSynViewController"
                                                                targetTitle:@"Item 8 View"
                                                                  deletable:NO],
                                      [[MyLauncherItem alloc] initWithTitle:@"系统设置"
                                                                iPhoneImage:@"xtsz"
                                                                  iPadImage:@"xtsz"
                                                                     target:@"XDSettingViewController"
                                                                targetTitle:@"Item 9 View"
                                                                  deletable:YES],
                                      nil],
                                     
                                     nil]];
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
